<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String goodsId =request.getParameter("goodsId");
request.setAttribute("goodsId", goodsId);
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>商品参数</title>
		<style type="text/css">
			.goodDataA {
			    width: 93.06%;
			    margin: 0 auto 10.0rem;
			}
			.goodDataA li span:nth-child(1) {
			    display: inline-block;
			    width: 29%;
			    color: rgb(102,102,102);
			}
			.goodDataA li {
			    width: 100%;
			    height: 9.9rem;
			    border-bottom: 1px solid rgb(229,229,229);
			    line-height: 9.9rem;
			}
			.goodDataA li span {
			    font-size: 2.6rem;
			    color: rgb(51,51,51);
			}
		</style>
		<%@include file="common.jsp" %>
		<script type="text/javascript">
			$(function(){
			//	var goodsId = 78;
				var goodsId = ${goodsId};
				if(goodsId!=null && goodsId!=undefined){
					$.ajax({
						url : "${ctx}/app/goods/selectOne",
						type : "POST",
						data : {"id" : goodsId},
						async : false, 
						success : function(data,status){
							$("#brandName").text(data.data.brandName);
							$("#className").text(data.data.className);
							$("#title").text(data.data.title);
							$("#goodsName").text(data.data.name);
							$("#specification").text(data.data.specification);
							$("#unitName").text(data.data.unitName);
						},
						error : function(xhr,status,e){
							alert("服务器出了问题，请检查！"+e);	
						}
					});
				}else{
					alert("商品ID传值不能为空！！！");
				}
			});
		</script>
	</head>
	<body style="height:800px; overflow-y: scroll;">
		<ul class="goodDataA">
			<li>
				<span>品牌</span>
				<span id="brandName"></span>
			</li>
			<li>
				<span>商品分类</span>
				<span id="className"></span>
			</li>
			<li>
				<span>商品标题</span>
				<span id="title"></span>
			</li>
			<li>
				<span>商品名称</span>
				<span id="goodsName"></span>
			</li>
			<li>
				<span>货号</span>
				<span id="specification"></span>
			</li>
			<li>
				<span>单位</span>
				<span id="unitName"></span>
			</li>
		</ul>
	</body>
</html>